<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title th:text="${indexTitle}">普天集成平台</title>
    <link rel="icon" type="image/x-icon" th:href="@{/images/favicon.ico}">
    <link rel="stylesheet" th:href="@{/assets/bootstrap/css/bootstrap.min.css}">
    <link rel="stylesheet" th:href="@{/assets/font-awesome/css/font-awesome.min.css}">
    <link rel="stylesheet" th:href="@{/css/base.css}">
    <link rel="stylesheet" th:href="@{/css/login.css}">
    <link rel="stylesheet" th:href="@{/css/qrcode.css}">
</head>
<body>
<div class="main">
    <!--标题-->
    <div class="login-title">
        <h1 th:text="${indexTitle}">普天集成平台</h1>
    </div>
    <!-- 登录 -->

    <div class="login-main">
        <form th:action="@{/platform/login}" method="post" onsubmit="setUser()" class="" autocomplete="off">
            <div class="login-group">
                <label for="username" class="login-label">账号</label>

                <input type="text" id="username" name="username" class="login-input" placeholder="" value="">
            </div>
            <div class="login-group">
                <label for="password" class="login-label">密码</label>
                <input type="password" id="password" name="password" class="login-input" placeholder="" value="" >
            </div>
            <div class="login-group">
                <input type="checkBox" id="remember" class="login-check">
                <label for="remember" class="login-label">记住密码</label>
            </div>
            <div class="login-group">
                <button type="submit" class="btn btn-orange" id="btn">登 录</button>
            </div>
        </form>
    </div>
    <div class="login-msg-error">
        <p th:if="${session.SPRING_SECURITY_LAST_EXCEPTION} != null" th:text="用户名或密码错误！"></p>
    </div>
</div>

<!--app下载二维码 -->
<div class="asid_code" id="asid_code">
    <div class="asid_code_box relative">
        <a href="../download/download.html"><img alt="扫码下载" title="扫码下载" class="adid_icon" src="../images/download_apk.png"></a>
        <div class="asid_code_triangle" style="display:none;">
            <em class="border_sj">&#9670;</em>
            <span class="con_sj">&#9670;</span>
        </div>
        <div class="asid_code_layer">
            <!-- <p class="sweep_img"><img th:src="@{images/xiazai.png}"></p> -->
            <p class="sweep_img"><b>点击跳转至App下载页</b></p>
        </div>
    </div>
    <div class="asid_code_box relative" style="display:none;"></div>
</div>
<!--app下载二维码 -->

    <script th:src="@{/assets/jquery/jquery.min.js}"></script>
    <script th:src="@{/assets/bootstrap/js/bootstrap.min.js}"></script>
    <script th:src="@{/assets/jquery.hhShare/jQuery.hhShare.min.js}"></script>
    <script>
        if(window != window.parent){
            window.parent.location.reload(true);
        };
        if (top != window) {
            top.location.href = window.location.href;
        };
        var _account = "";
        if(_account = localStorage.account){
        	_account = _account.split("/");
        	$("#username").val(_account[0]);
        	$("#password").val(_account[1]);
        	document.getElementById('remember').checked = true;
        }
        function setUser(){
        	if($("#remember").is(":checked")){
        		localStorage.account = $("#username").val() + "/" + $("#password").val();
        	}else{
        		localStorage.removeItem("account");
        	}
        }

        $(function(){
            $('#asid_code').hhShare();
        });
    </script>
</body>
</html>